/* ============================================================
   广告横幅 — 独立样式文件 (ad-banner.css)
   放置位置: assets/css/ad-banner.css
   ============================================================ */

.ad-banner-section {
    width: 100%;
    padding: 0;
    margin: 0;
    position: relative;
    overflow: hidden;
    background: #0a1628;
}

.ad-banner-inner {
    position: relative;
    width: 100%;
    margin: 0 auto;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

/* 背景图：img 标签绝对定位铺满 */
.ad-banner-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    display: block;
    border: none;
}

/* 遮罩：极淡，确保文字可读但不盖死背景图 */
.ad-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 40, 120, 0.2);
    z-index: 2;
    pointer-events: none;
}

/* 内容层 — 移动端默认垂直排列 */
.ad-banner-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    text-align: center;
}

.ad-banner-title {
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.02em;
    margin: 0;
}

.ad-banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.2rem;
    background: #f59e0b;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
}

.ad-banner-btn:hover {
    background: #fbbf24;
    transform: translateY(-1px);
}

.ad-banner-btn:active {
    transform: scale(0.97);
}

/* ==================== PC端 (>=1024px) ==================== */
/* 文字在左，按钮在右，横向排列 */
@media (min-width: 1024px) {
    .ad-banner-inner {
        min-height: 110px;
        padding: 1rem 2.5rem;
    }

    .ad-banner-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        max-width: 1100px;
        margin: 0 auto;
        text-align: left;
        gap: 2rem;
    }

    .ad-banner-title {
        font-size: 1.25rem;
        flex: 1;
        text-align: left;
    }

    .ad-banner-btn {
        padding: 0.55rem 1.5rem;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
}

/* ==================== 平板端 (768px - 1023px) ==================== */
@media (min-width: 768px) and (max-width: 1023px) {
    .ad-banner-inner {
        min-height: 100px;
        padding: 1rem 2rem;
    }

    .ad-banner-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        max-width: 900px;
        margin: 0 auto;
        text-align: left;
        gap: 1.5rem;
    }

    .ad-banner-title {
        font-size: 1.1rem;
        flex: 1;
        text-align: left;
    }

    .ad-banner-btn {
        padding: 0.5rem 1.3rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
}

/* ==================== 减弱动画偏好 ==================== */
@media (prefers-reduced-motion: reduce) {
    .ad-banner-btn {
        transition: none;
    }
    .ad-banner-btn:hover {
        transform: none;
    }
}
